var orderId = sessionStorage.getItem("orderId");
console.log(orderId);

var orderData = {
    order_id: orderId
};
var succCallBack = function (data, status, response) {
    if (data.errorCode == 0) {
        console.log(data.data)
        var obj = data.data;
        if (obj.invoice_status == 10 || obj.invoice_status == 20) {
            $("#invoice_status").html('待开');
        } else if (obj.invoice_status == 30) {
            $("#invoice_status").html('部分开');
        }

        if (obj.invoice_type == 10) {
            $("#invoice_type").html('增值税');
            $("#registeredAddress").html(obj.register_address);
            $("#registeredTelehone").html(obj.register_phone);
            $("#depositBank").html(obj.open_bank);
            $("#bankAccount").html(obj.bank_account);
        } else if (obj.invoice_type == 20) {
            $("#invoice_type").html('普税');
            $('.added_value').each(function (i){
                // i就是索引值
                // this 表示获取遍历每一个dom对象
                $(this).hide();
            });
        } else if (obj.invoice_type == 30) {
            $("#invoice_type").html('未选择发票');
            $('.added_value').each(function (i){
                $(this).hide();
            });
        }
        $("#remarks").html(obj.invoice_remark);
        $("#submit_time").html(obj.create_date);
        $("#invoice_title").html(obj.invoice_title);
        if (obj.invoice_title == "个人") {
            $("#isShow").hide();
        }
        $("#taxpayer_identify_num").html(obj.taxpayer_identify_num);
        $("#addressArea").html(obj.province_name + obj.city_name + obj.area_name + obj.town_name);
        $("#detail_address").html(obj.detail_address);
        $("#received_name").html(obj.received_name);
        $("#received_phone").html(obj.received_phone);

    }
}
web.doAjax(root.orderInter.order_queryInoviceDetails, 'post', orderData, succCallBack);